﻿using System;

namespace ContextualStateless
{
    public partial class StateMachine< TState, TTrigger, TContext >
    {
        /// <summary>
        /// Unconditional trigger representation.
        /// </summary>
        internal class UnguardedTriggerRepresentation : AbstractTriggerRepresentation
        {
            public UnguardedTriggerRepresentation( TTrigger trigger, Func< TContext, bool > guard, LogicalActionHandler contextHandler )
                : base( trigger, guard, contextHandler )
            {
            }

            public UnguardedTriggerRepresentation( TTrigger trigger, Func< TContext, bool > guard )
                : this( trigger, guard, null )
            {
            }

            // --------------------------------------------------------------------------------------------------------------

            public override bool ResultsInTransitionFrom(TState source, object[] args, TContext context, out TState destination)
            {
                destination = default(TState);
                return false;
            }
        }
    }
}
